package net.adetech.port.entity;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;

public class PCGTicket {

    //班次
    private String bc;
    //仓位
    private String cw;
    //更新时间
    private Timestamp gxsj;
    //主键Id
    private String id;
    //检票时间
    private Timestamp jpsj;
    //开船时间
    private Timestamp kcsj;
    //类型
    private String lx;
    //起止地
    private String qzd;
    //入库时间
    private Timestamp rksj;
    //身份证号
    private String sfzh;
    //证件类型
    private String zjlx;
    //售票时间
    private Timestamp spsj;
    //姓名
    private String xm;

    //始发港
    private String sfg;
    //到达港
    private String ddg;

    //售票方式
    private String spfs;



    public String getBc() {
        return bc;
    }

    public void setBc(String bc) {
        this.bc = bc;
    }

    public String getCw() {
        return cw;
    }

    public void setCw(String cw) {
        this.cw = cw;
    }

    public Timestamp getGxsj() {
        return gxsj;
    }

    public void setGxsj(Timestamp gxsj) {
        this.gxsj = gxsj;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Timestamp getJpsj() {
        return jpsj;
    }

    public void setJpsj(Timestamp jpsj) {
        this.jpsj = jpsj;
    }

    public Timestamp getKcsj() {
        return kcsj;
    }

    public void setKcsj(Timestamp kcsj) {
        this.kcsj = kcsj;
    }

    public String getLx() {
        return lx;
    }

    public void setLx(String lx) {
        this.lx = lx;
    }

    public String getQzd() {
        return qzd;
    }

    public void setQzd(String qzd) {
        this.qzd = qzd;
    }

    public Timestamp getRksj() {
        return rksj;
    }

    public void setRksj(Timestamp rksj) {
        this.rksj = rksj;
    }

    public String getSfzh() {
        return sfzh;
    }

    public void setSfzh(String sfzh) {
        this.sfzh = sfzh;
    }

    public Timestamp getSpsj() {
        return spsj;
    }

    public void setSpsj(Timestamp spsj) {
        this.spsj = spsj;
    }

    public String getXm() {
        return xm;
    }

    public String getInfoWithMask()
    {
        String result = "";
        if (xm!=null&&xm.length()>1)
        {
            result+="*"+xm.substring(1);
        }
        if (sfzh!=null&&sfzh.length()==18)
        {
            result += ("("+sfzh.substring(0,10)+"****"+sfzh.substring(14)+")");
        }
        return result;

    }

    public void setXm(String xm) {
        this.xm = xm;
    }

    public String getSfg() {
        return sfg;
    }

    public void setSfg(String sfg) {
        this.sfg = sfg;
    }

    public String getDdg() {
        return ddg;
    }

    public void setDdg(String ddg) {
        this.ddg = ddg;
    }

    public String getZjlx() {
        return zjlx;
    }

    public void setZjlx(String zjlx) {
        this.zjlx = zjlx;
    }

    public String getKcsjString()
    {
        if (this.kcsj!=null)
        {
            return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(kcsj);
        }
        return null;
    }


    public String getSpsjString()
    {
        if (this.spsj!=null)
        {
            return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(spsj);
        }
        return null;
    }

    public String getRksjString()
    {
        if (this.rksj!=null)
        {
            return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(rksj);
        }
        return null;
    }

    public String getGxsjString()
    {
        if (this.gxsj!=null)
        {
            return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(gxsj);
        }
        return null;
    }
}
